.class public Lcom/ss/android/socialbase/appdownloader/f;
.super Lcom/ss/android/socialbase/downloader/notification/a;
.source "AppNotificationItem.java"


# instance fields
.field private final i:Landroid/content/Context;

.field private final j:Landroid/content/res/Resources;

.field private k:Ljava/lang/String;

.field private l:Ljava/lang/String;

.field private m:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    .line 1
    invoke-direct {p0, p2, p3}, Lcom/ss/android/socialbase/downloader/notification/a;-><init>(ILjava/lang/String;)V

    .line 2
    iput-object p4, p0, Lcom/ss/android/socialbase/appdownloader/f;->l:Ljava/lang/String;

    .line 3
    iput-object p5, p0, Lcom/ss/android/socialbase/appdownloader/f;->k:Ljava/lang/String;

    .line 4
    iput-object p6, p0, Lcom/ss/android/socialbase/appdownloader/f;->m:Ljava/lang/String;

    .line 5
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    iput-object p1, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    .line 6
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    iput-object p1, p0, Lcom/ss/android/socialbase/appdownloader/f;->j:Landroid/content/res/Resources;

    return-void
.end method

.method private a(I)I
    .locals 1

    const/4 v0, 0x1

    if-eq p1, v0, :cond_3

    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    goto :goto_0

    :cond_0
    const/4 v0, 0x2

    if-ne p1, v0, :cond_1

    .line 13
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->s()I

    move-result p1

    goto :goto_1

    :cond_1
    const/4 v0, 0x3

    if-ne p1, v0, :cond_2

    .line 14
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->t()I

    move-result p1

    goto :goto_1

    :cond_2
    const/4 p1, 0x0

    goto :goto_1

    .line 15
    :cond_3
    :goto_0
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->r()I

    move-result p1

    :goto_1
    return p1
.end method

.method private a(Ljava/lang/String;II)Landroid/app/PendingIntent;
    .locals 3

    .line 16
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    const-class v2, Lcom/ss/android/socialbase/appdownloader/DownloadHandlerService;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 17
    invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "extra_click_download_ids"

    .line 18
    invoke-virtual {v0, p1, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string p1, "extra_click_download_type"

    .line 19
    invoke-virtual {v0, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string p1, "extra_from_notification"

    const/4 p2, 0x1

    .line 20
    invoke-virtual {v0, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 21
    iget-object p1, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    const/high16 p2, 0x8000000

    invoke-static {p1, p3, v0, p2}, Landroid/app/PendingIntent;->getService(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method private a(Lcom/ss/android/socialbase/downloader/e/a;Les/jo0;Les/zn0;)Z
    .locals 4

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-eqz p1, :cond_1

    .line 9
    invoke-virtual {p1}, Lcom/ss/android/socialbase/downloader/e/a;->a()I

    move-result v2

    const/16 v3, 0x3f5

    if-eq v2, v3, :cond_0

    .line 10
    invoke-virtual {p1}, Lcom/ss/android/socialbase/downloader/e/a;->a()I

    move-result p1

    const/16 v2, 0x419

    if-ne p1, v2, :cond_1

    :cond_0
    if-eqz p3, :cond_1

    .line 11
    invoke-virtual {p3}, Les/zn0;->i0()Ljava/lang/String;

    move-result-object p1

    const-string p3, "application/vnd.android.package-archive"

    invoke-virtual {p3, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result p1

    if-eqz p1, :cond_1

    const-string p1, "notification_text_opt"

    .line 12
    invoke-virtual {p2, p1, v1}, Les/jo0;->a(Ljava/lang/String;I)I

    move-result p1

    if-ne p1, v0, :cond_1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private b(Lcom/ss/android/socialbase/downloader/e/a;Z)Landroid/app/Notification;
    .locals 23

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    .line 1
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->e()I

    move-result v2

    .line 2
    invoke-static {v2}, Lcom/ss/android/socialbase/appdownloader/d;->a(I)I

    move-result v3

    const/4 v4, 0x0

    if-nez v3, :cond_0

    return-object v4

    .line 3
    :cond_0
    invoke-direct/range {p0 .. p0}, Lcom/ss/android/socialbase/appdownloader/f;->k()Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v5

    .line 4
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->f()J

    move-result-wide v6

    invoke-virtual {v5, v6, v7}, Landroidx/core/app/NotificationCompat$Builder;->setWhen(J)Landroidx/core/app/NotificationCompat$Builder;

    .line 5
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->a()I

    move-result v6

    .line 6
    invoke-static {v6}, Les/jo0;->a(I)Les/jo0;

    move-result-object v7

    .line 7
    sget v8, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v9, 0x18

    const/4 v10, 0x1

    const/4 v11, 0x0

    if-lt v8, v9, :cond_1

    const-string v8, "set_notification_group"

    .line 8
    invoke-virtual {v7, v8, v11}, Les/jo0;->a(Ljava/lang/String;I)I

    move-result v8

    if-ne v8, v10, :cond_1

    const-string v8, "com.ss.android.socialbase.APP_DOWNLOADER"

    .line 9
    invoke-virtual {v5, v8}, Landroidx/core/app/NotificationCompat$Builder;->setGroup(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    .line 10
    invoke-virtual {v5, v11}, Landroidx/core/app/NotificationCompat$Builder;->setGroupSummary(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 11
    :cond_1
    invoke-direct {v0, v3}, Lcom/ss/android/socialbase/appdownloader/f;->a(I)I

    move-result v8

    if-nez v8, :cond_2

    return-object v4

    .line 12
    :cond_2
    invoke-virtual {v5, v8}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    const/4 v9, -0x4

    const/4 v12, -0x1

    const/4 v13, 0x3

    const-string v14, "android.ss.intent.action.DOWNLOAD_DELETE"

    const/4 v15, 0x2

    const/4 v4, 0x4

    if-eq v3, v10, :cond_8

    if-eq v3, v4, :cond_8

    if-ne v3, v15, :cond_3

    goto :goto_2

    :cond_3
    if-ne v3, v13, :cond_b

    .line 13
    invoke-virtual {v5, v11}, Landroidx/core/app/NotificationCompat$Builder;->setOngoing(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 14
    invoke-virtual {v5, v10}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    const-string v16, "android.ss.intent.action.DOWNLOAD_OPEN"

    if-eq v2, v12, :cond_7

    if-ne v2, v9, :cond_4

    goto :goto_0

    :cond_4
    const/4 v9, -0x3

    if-ne v2, v9, :cond_6

    const-string v2, "notification_click_install_auto_cancel"

    .line 15
    invoke-virtual {v7, v2, v10}, Les/jo0;->a(Ljava/lang/String;I)I

    move-result v2

    if-nez v2, :cond_6

    .line 16
    invoke-virtual {v5, v11}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 17
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->h()I

    move-result v2

    if-lez v2, :cond_5

    .line 18
    invoke-virtual {v5, v11}, Landroidx/core/app/NotificationCompat$Builder;->setOngoing(Z)Landroidx/core/app/NotificationCompat$Builder;

    move-object/from16 v14, v16

    const/4 v2, 0x0

    goto :goto_1

    .line 19
    :cond_5
    invoke-virtual {v5, v10}, Landroidx/core/app/NotificationCompat$Builder;->setOngoing(Z)Landroidx/core/app/NotificationCompat$Builder;

    :cond_6
    move-object/from16 v14, v16

    :cond_7
    :goto_0
    const/4 v2, 0x1

    .line 20
    :goto_1
    invoke-direct {v0, v14, v3, v6}, Lcom/ss/android/socialbase/appdownloader/f;->a(Ljava/lang/String;II)Landroid/app/PendingIntent;

    move-result-object v9

    invoke-virtual {v5, v9}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    const-string v9, "android.ss.intent.action.DOWNLOAD_HIDE"

    .line 21
    invoke-direct {v0, v9, v3, v6}, Lcom/ss/android/socialbase/appdownloader/f;->a(Ljava/lang/String;II)Landroid/app/PendingIntent;

    move-result-object v9

    invoke-virtual {v5, v9}, Landroidx/core/app/NotificationCompat$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    goto :goto_5

    .line 22
    :cond_8
    :goto_2
    invoke-direct {v0, v14, v3, v6}, Lcom/ss/android/socialbase/appdownloader/f;->a(Ljava/lang/String;II)Landroid/app/PendingIntent;

    move-result-object v2

    invoke-virtual {v5, v2}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    if-eq v3, v10, :cond_a

    if-ne v3, v4, :cond_9

    goto :goto_3

    :cond_9
    const/4 v2, 0x0

    goto :goto_4

    :cond_a
    :goto_3
    const/4 v2, 0x1

    .line 23
    :goto_4
    invoke-virtual {v5, v2}, Landroidx/core/app/NotificationCompat$Builder;->setOngoing(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 24
    invoke-virtual {v5, v11}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    :cond_b
    const/4 v2, 0x1

    .line 25
    :goto_5
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->b()J

    move-result-wide v17

    .line 26
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->c()J

    move-result-wide v19

    if-eq v3, v10, :cond_d

    if-ne v3, v4, :cond_c

    goto :goto_6

    :cond_c
    const/4 v13, 0x0

    goto :goto_7

    :cond_d
    :goto_6
    const-wide/16 v21, 0x0

    cmp-long v9, v19, v21

    if-lez v9, :cond_c

    const-wide/16 v21, 0x64

    mul-long v17, v17, v21

    .line 27
    div-long v12, v17, v19

    long-to-int v13, v12

    .line 28
    :goto_7
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->d()Ljava/lang/String;

    move-result-object v12

    .line 29
    invoke-static {v12}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v16

    if-eqz v16, :cond_e

    const-string v12, "appdownloader_download_unknown_title"

    .line 30
    invoke-static {v12}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v12

    .line 31
    iget-object v9, v0, Lcom/ss/android/socialbase/appdownloader/f;->j:Landroid/content/res/Resources;

    invoke-virtual {v9, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v12

    .line 32
    :cond_e
    invoke-direct/range {p0 .. p0}, Lcom/ss/android/socialbase/appdownloader/f;->j()Landroid/widget/RemoteViews;

    move-result-object v9

    .line 33
    new-instance v14, Landroid/content/Intent;

    iget-object v11, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    const-class v15, Lcom/ss/android/socialbase/appdownloader/DownloadHandlerService;

    invoke-direct {v14, v11, v15}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v11, "android.ss.intent.action.DOWNLOAD_CLICK"

    .line 34
    invoke-virtual {v14, v11}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 35
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->d()Ljava/lang/String;

    move-result-object v11

    const-string v15, "notification_name"

    invoke-virtual {v14, v15, v11}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v11, "extra_click_download_ids"

    .line 36
    invoke-virtual {v14, v11, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v11, "extra_click_download_type"

    .line 37
    invoke-virtual {v14, v11, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 38
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->j()I

    move-result v11

    .line 39
    iget-object v15, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    const/high16 v4, 0x8000000

    invoke-static {v15, v6, v14, v4}, Landroid/app/PendingIntent;->getService(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v4

    invoke-virtual {v9, v11, v4}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

    .line 40
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->l()I

    move-result v4

    .line 41
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 42
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->g()I

    move-result v4

    const/16 v11, 0x64

    move/from16 v12, p2

    .line 43
    invoke-virtual {v9, v4, v11, v13, v12}, Landroid/widget/RemoteViews;->setProgressBar(IIIZ)V

    .line 44
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->k()I

    move-result v4

    .line 45
    invoke-virtual {v9, v4, v8}, Landroid/widget/RemoteViews;->setImageViewResource(II)V

    const-string v4, "appdownloader_notification_download_pause"

    const-string v8, "/"

    const-string v11, ""

    const/16 v12, 0x8

    if-eq v3, v10, :cond_1d

    const/4 v13, 0x4

    if-ne v3, v13, :cond_f

    goto/16 :goto_e

    :cond_f
    const/4 v13, 0x2

    if-ne v3, v13, :cond_11

    .line 46
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->b()J

    move-result-wide v6

    invoke-static {v6, v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 47
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->c()J

    move-result-wide v6

    invoke-static {v6, v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    .line 48
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    .line 49
    iget-object v3, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    const-string v3, "appdownloader_notification_download_resume"

    .line 50
    invoke-static {v3}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 51
    iget-object v4, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 52
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->g()I

    move-result v4

    .line 53
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 54
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->h()I

    move-result v4

    .line 55
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 56
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->i()I

    move-result v4

    const/4 v6, 0x0

    .line 57
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 58
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->j()I

    move-result v4

    .line 59
    iget-object v7, v0, Lcom/ss/android/socialbase/appdownloader/f;->m:Ljava/lang/String;

    invoke-static {v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_10

    .line 60
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    goto/16 :goto_10

    .line 61
    :cond_10
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    goto/16 :goto_10

    :cond_11
    const/4 v4, 0x3

    if-ne v3, v4, :cond_1c

    .line 62
    invoke-static {}, Lcom/ss/android/socialbase/downloader/downloader/c;->b()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Lcom/ss/android/socialbase/downloader/downloader/g;->a(Landroid/content/Context;)Lcom/ss/android/socialbase/downloader/downloader/g;

    move-result-object v3

    invoke-virtual {v3, v6}, Lcom/ss/android/socialbase/downloader/downloader/g;->h(I)Les/zn0;

    move-result-object v3

    .line 63
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->e()I

    move-result v4

    const/4 v8, -0x1

    if-eq v4, v8, :cond_17

    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->e()I

    move-result v4

    const/4 v8, -0x4

    if-ne v4, v8, :cond_12

    goto/16 :goto_9

    .line 64
    :cond_12
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->e()I

    move-result v1

    const/4 v4, -0x3

    if-ne v1, v4, :cond_16

    .line 65
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->c()J

    move-result-wide v7

    invoke-static {v7, v8}, Lcom/ss/android/socialbase/appdownloader/d;->a(J)Ljava/lang/String;

    move-result-object v1

    const-string v4, "appdownloader_notification_download_complete_open"

    if-eqz v3, :cond_14

    .line 66
    invoke-virtual {v3}, Les/zn0;->i0()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_14

    invoke-virtual {v3}, Les/zn0;->i0()Ljava/lang/String;

    move-result-object v7

    const-string v8, "application/vnd.android.package-archive"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_14

    .line 67
    iget-object v6, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    iget-object v7, v0, Lcom/ss/android/socialbase/appdownloader/f;->l:Ljava/lang/String;

    iget-object v8, v0, Lcom/ss/android/socialbase/appdownloader/f;->k:Ljava/lang/String;

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v13, "url: "

    invoke-virtual {v11, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Les/zn0;->Q0()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v11, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v13, ", backupUrl: "

    invoke-virtual {v11, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Les/zn0;->k()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v11, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v6, v7, v8, v3}, Lcom/ss/android/socialbase/appdownloader/d;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_13

    .line 68
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    goto :goto_8

    :cond_13
    const-string v3, "appdownloader_notification_download_complete_with_install"

    .line 69
    invoke-static {v3}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 70
    iget-object v4, v0, Lcom/ss/android/socialbase/appdownloader/f;->j:Landroid/content/res/Resources;

    invoke-virtual {v4, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Landroidx/core/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    goto :goto_8

    :cond_14
    const-string v3, "appdownloader_notification_download_complete_without_install"

    .line 71
    invoke-static {v3}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 72
    invoke-static {}, Lcom/ss/android/socialbase/downloader/downloader/d;->c()Lcom/ss/android/socialbase/downloader/downloader/d;

    move-result-object v7

    invoke-virtual {v7, v6}, Lcom/ss/android/socialbase/downloader/downloader/d;->l(I)Les/sm0;

    move-result-object v6

    if-eqz v6, :cond_15

    .line 73
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 74
    :cond_15
    :goto_8
    iget-object v4, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    const-string v4, "appdownloader_notification_download_install"

    .line 75
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v4

    .line 76
    iget-object v6, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    invoke-virtual {v6, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    move-object v11, v1

    move-object v1, v3

    move-object v3, v4

    goto/16 :goto_d

    :cond_16
    move-object v1, v11

    move-object v3, v1

    goto :goto_d

    .line 77
    :cond_17
    :goto_9
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->n()I

    move-result v4

    .line 78
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    if-eqz v1, :cond_18

    .line 79
    invoke-virtual/range {p1 .. p1}, Lcom/ss/android/socialbase/downloader/e/a;->a()I

    move-result v4

    const/16 v6, 0x3ee

    if-ne v4, v6, :cond_18

    const-string v1, "appdownloader_notification_download_space_failed"

    .line 80
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    .line 81
    iget-object v3, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    goto :goto_c

    .line 82
    :cond_18
    invoke-direct {v0, v1, v7, v3}, Lcom/ss/android/socialbase/appdownloader/f;->a(Lcom/ss/android/socialbase/downloader/e/a;Les/jo0;Les/zn0;)Z

    move-result v1

    if-eqz v1, :cond_1b

    if-eqz v3, :cond_19

    .line 83
    invoke-virtual {v3}, Les/zn0;->e1()Z

    move-result v1

    if-eqz v1, :cond_19

    const/4 v1, 0x1

    goto :goto_a

    :cond_19
    const/4 v1, 0x0

    :goto_a
    if-eqz v1, :cond_1a

    const-string v1, "appdownloader_notification_download_waiting_wifi"

    .line 84
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    goto :goto_b

    :cond_1a
    const-string v1, "appdownloader_notification_download_waiting_net"

    .line 85
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    .line 86
    :goto_b
    iget-object v3, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    goto :goto_c

    :cond_1b
    const-string v1, "appdownloader_notification_download_failed"

    .line 87
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    .line 88
    iget-object v3, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    :goto_c
    const-string v3, "appdownloader_notification_download_restart"

    .line 89
    invoke-static {v3}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 90
    iget-object v4, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 91
    :goto_d
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->g()I

    move-result v4

    .line 92
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 93
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->h()I

    move-result v4

    const/4 v6, 0x0

    .line 94
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 95
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->i()I

    move-result v4

    .line 96
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 97
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->j()I

    move-result v4

    .line 98
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    goto/16 :goto_10

    :cond_1c
    move-object v1, v11

    move-object v3, v1

    goto :goto_10

    .line 99
    :cond_1d
    :goto_e
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->b()J

    move-result-wide v6

    invoke-static {v6, v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(J)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 100
    invoke-virtual/range {p0 .. p0}, Lcom/ss/android/socialbase/downloader/notification/a;->c()J

    move-result-wide v6

    invoke-static {v6, v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(J)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    if-ne v3, v10, :cond_1e

    const-string v1, "appdownloader_notification_downloading"

    .line 101
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    goto :goto_f

    :cond_1e
    const-string v1, "appdownloader_notification_prepare"

    .line 102
    invoke-static {v1}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v1

    .line 103
    :goto_f
    iget-object v3, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 104
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/l;->b(Ljava/lang/String;)I

    move-result v3

    .line 105
    iget-object v4, v0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 106
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->g()I

    move-result v4

    const/4 v6, 0x0

    .line 107
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 108
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->h()I

    move-result v4

    .line 109
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 110
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->i()I

    move-result v4

    .line 111
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 112
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->j()I

    move-result v4

    .line 113
    iget-object v7, v0, Lcom/ss/android/socialbase/appdownloader/f;->m:Ljava/lang/String;

    invoke-static {v7}, Lcom/ss/android/socialbase/appdownloader/d;->a(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_1f

    .line 114
    invoke-virtual {v9, v4, v12}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    goto :goto_10

    .line 115
    :cond_1f
    invoke-virtual {v9, v4, v6}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    .line 116
    :goto_10
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->m()I

    move-result v4

    .line 117
    invoke-virtual {v9, v4, v11}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 118
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->o()I

    move-result v4

    .line 119
    invoke-virtual {v9, v4, v1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 120
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->n()I

    move-result v4

    .line 121
    invoke-virtual {v9, v4, v11}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 122
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->p()I

    move-result v4

    .line 123
    invoke-virtual {v9, v4, v1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 124
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->j()I

    move-result v1

    .line 125
    invoke-virtual {v9, v1, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 126
    invoke-virtual {v5}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v1

    if-eqz v2, :cond_20

    .line 127
    iget v2, v1, Landroid/app/Notification;->flags:I

    const/4 v3, 0x2

    or-int/2addr v2, v3

    iput v2, v1, Landroid/app/Notification;->flags:I

    .line 128
    invoke-virtual {v0, v10}, Lcom/ss/android/socialbase/downloader/notification/a;->a(Z)V

    goto :goto_11

    :cond_20
    const/4 v2, 0x0

    .line 129
    invoke-virtual {v0, v2}, Lcom/ss/android/socialbase/downloader/notification/a;->a(Z)V

    .line 130
    :goto_11
    iput-object v9, v1, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

    return-object v1
.end method

.method private j()Landroid/widget/RemoteViews;
    .locals 5

    .line 1
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->a()I

    move-result v0

    .line 2
    new-instance v1, Landroid/widget/RemoteViews;

    iget-object v2, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

    .line 3
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x14

    if-le v0, v2, :cond_0

    .line 4
    :try_start_0
    iget-object v0, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-static {v0}, Lcom/ss/android/socialbase/appdownloader/d;->b(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 5
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->f()I

    move-result v0

    .line 6
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/g;->q()I

    move-result v2

    const-string v3, "setBackgroundColor"

    .line 7
    iget-object v4, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    .line 8
    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v2}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    .line 9
    invoke-virtual {v1, v0, v3, v2}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :catchall_0
    :cond_0
    return-object v1
.end method

.method private k()Landroidx/core/app/NotificationCompat$Builder;
    .locals 3

    .line 1
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/e;->k()Lcom/ss/android/socialbase/appdownloader/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ss/android/socialbase/appdownloader/e;->g()Ljava/lang/String;

    move-result-object v0

    .line 2
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x1a

    if-ge v1, v2, :cond_0

    .line 3
    new-instance v0, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 4
    :cond_0
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 5
    iget-object v0, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-static {v0}, Lcom/ss/android/socialbase/appdownloader/d;->c(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    .line 6
    :cond_1
    :try_start_0
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/e;->k()Lcom/ss/android/socialbase/appdownloader/e;

    move-result-object v1

    invoke-virtual {v1}, Lcom/ss/android/socialbase/appdownloader/e;->h()Les/dm0;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 7
    invoke-static {}, Lcom/ss/android/socialbase/appdownloader/e;->k()Lcom/ss/android/socialbase/appdownloader/e;

    move-result-object v1

    invoke-virtual {v1}, Lcom/ss/android/socialbase/appdownloader/e;->h()Les/dm0;

    move-result-object v1

    iget-object v2, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-interface {v1, v2, v0}, Les/dm0;->a(Landroid/content/Context;Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    goto :goto_0

    .line 8
    :cond_2
    new-instance v1, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v2, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-direct {v1, v2, v0}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_0} :catch_0

    move-object v0, v1

    goto :goto_0

    .line 9
    :catch_0
    new-instance v0, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    :goto_0
    return-object v0
.end method


# virtual methods
.method protected a(Lcom/ss/android/socialbase/downloader/e/a;Z)V
    .locals 1

    .line 5
    iget-object v0, p0, Lcom/ss/android/socialbase/appdownloader/f;->i:Landroid/content/Context;

    if-nez v0, :cond_0

    return-void

    .line 6
    :cond_0
    :try_start_0
    invoke-direct {p0, p1, p2}, Lcom/ss/android/socialbase/appdownloader/f;->b(Lcom/ss/android/socialbase/downloader/e/a;Z)Landroid/app/Notification;

    move-result-object p1

    .line 7
    invoke-virtual {p0, p1}, Lcom/ss/android/socialbase/downloader/notification/a;->a(Landroid/app/Notification;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 8
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    return-void
.end method

.method public a(Les/zn0;)V
    .locals 1

    .line 1
    invoke-super {p0, p1}, Lcom/ss/android/socialbase/downloader/notification/a;->a(Les/zn0;)V

    .line 2
    invoke-virtual {p1}, Les/zn0;->R0()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/ss/android/socialbase/appdownloader/f;->l:Ljava/lang/String;

    .line 3
    invoke-virtual {p1}, Les/zn0;->O0()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/ss/android/socialbase/appdownloader/f;->k:Ljava/lang/String;

    .line 4
    invoke-virtual {p1}, Les/zn0;->f1()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/ss/android/socialbase/appdownloader/f;->m:Ljava/lang/String;

    return-void
.end method
